package com.gwcm.mapper;

import com.gwcm.model.entity.MemberCard;
import com.gwcm.model.entity.User;
import com.gwcm.model.entity.UserMemberCard;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gwcm.model.entity.UserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 15375
* @description 针对表【user_member_card(用户会员卡关联表)】的数据库操作Mapper
* @createDate 2023-03-21 16:19:38
* @Entity com.gwcm.model.entity.UserMemberCard
*/
public interface UserMemberCardMapper extends BaseMapper<UserMemberCard> {
    /**
     * 批量新增用户会员卡信息
     * @param userMemberCardList 用户会员卡列表
     * @return 结果
     */
    public int batchUserMemberCard(List<UserMemberCard> userMemberCardList);

    /**
     * 检查用户会员卡关联中用户是否唯一
     * @param userId
     * @return
     */
    int checkUserIdUnique(Long userId);

    /**
     * 根据用户ID和会员卡ID查询关联
     * @param userId
     * @param memberCardId
     * @return
     */
    UserMemberCard selectUserMemberCardByUserIdMemberCardId(@Param("userId") Long userId,@Param("memberCardId") Long memberCardId);
}




